<?php

/**
 * Empresa form.
 *
 * @package    cronos-doctrine
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class EmpresaForm extends BaseEmpresaForm
{
  public function configure()
  {
      //Eliminar los campos del formularios  created_at y updated_at
      unset (
        $this['empresa_id'],
        $this['created_at'],
        $this['updated_at'],
        $this['expires_at']

      );
      
     
     $this->widgetSchema['padre'] = new sfWidgetFormDoctrineChoice(array(
	            'model'     => 'Empresa',
                    'add_empty' => 'Principal',
      )); 
      
     $this->widgetSchema['entidad_id'] = new sfWidgetFormDoctrineChoice(array(
	            'model'     => 'Entidad',
                    'add_empty' => 'Seleccione Entidad',
      ));
      
      $this->validatorSchema['correo'] = new sfValidatorAnd(array(
        $this->validatorSchema['correo'],
        new sfValidatorEmail()
        
      ));
      
      $this->validatorSchema['correo_inf'] = new sfValidatorAnd(array(
        $this->validatorSchema['correo_inf'],
        new sfValidatorEmail()
        
      ));
      
      //Cambiar a lista y su validador d
      $this->widgetSchema['feriados'] = new sfWidgetFormInputHidden();
     
     
  }
}
